<!--
 * @Author: 熊志伟 xiongzhiwei
 * @Date: 2024-11-12 09:14:40
 * @LastEditors: 熊志伟 xiongzhiwei
 * @LastEditTime: 2024-11-20 09:07:04
 * @FilePath: \x-dev-tools\packages\ui\src\components\XTable\index.vue
 * @Description: 文件预览弹窗
-->
<script setup lang="ts">
import {
  CloseBold
} from '@element-plus/icons-vue'
const props = defineProps<{
  src: string,
  onClose: Function
}>()

const emits = defineEmits(['update:visible'])

</script>

<template>
  <div class="preview-fix">
    <el-button :icon="CloseBold" circle  class="close-btn" @click="() => props.onClose()"/>
    <FilePreview :src="props.src" class="mt-[20px]"/>
  </div>
</template>

<style lang="scss">
.preview-fix {
  @apply fixed top-0 left-0 w-full h-full p-[40px];
  z-index: 999;
  background: rgba(0, 0, 0, 0.6);

  .close-btn {
    @apply absolute right-[20px] top-[10px];
  }
}
</style>
